﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ContactForm.ascx.cs" Inherits="smartphone.UserControls.ContactForm" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Label ID="LabelCommentForm" CssClass="headerTemplate" runat="server" Text="Nhập nội dung liên hệ"></asp:Label>
<div id="comment-form">
    <p>
    <asp:Label ID="LabelComment" CssClass="commentInform" runat="server" Text="" Visible="false"></asp:Label>
    </p>

    <p>
    <label>Tên của bạn </label><asp:TextBox ID="TxtName" CssClass="commentInput" runat="server" Width="490" Height="25" EnableViewState="False"></asp:TextBox>
        <p><asp:RequiredFieldValidator ID="RequiredFieldValidatorName" runat="server" ErrorMessage="Bạn cần nhập tên của mình" ControlToValidate="TxtName" CssClass="validateError"></asp:RequiredFieldValidator></p>
    </p>

    <p>
    <label>Tiêu đề </label><asp:TextBox ID="TxtTitle" CssClass="commentInput" runat="server" Width="490" Height="25" EnableViewState="False"></asp:TextBox>
        <p><asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Bạn cần nhập tiêu đề" ControlToValidate="TxtTitle" CssClass="validateError"></asp:RequiredFieldValidator></p>
    </p>

    <p>
    <label>Email </label><asp:TextBox ID="TxtEmail" CssClass="commentInput" runat="server" Width="490" Height="25" EnableViewState="False"></asp:TextBox>
        <p><asp:RegularExpressionValidator ID="RegularExpressionValidatorEmail" runat="server" ErrorMessage="Bạn phải nhập mail hợp lệ" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ControlToValidate="TxtEmail" CssClass="validateError"></asp:RegularExpressionValidator></p>
    </p>

    <p>
    <label>Nội dung bình luận </label>
        <asp:TextBox ID="TextBoxContact" CssClass="commentInput" runat="server" Width="490" Height="300" TextMode="MultiLine"></asp:TextBox>
        <p><asp:CustomValidator ID="CustomValidatorContent" runat="server" ErrorMessage="Nội dung comment phải dài hơn 50 kí tự" ControlToValidate="TextBoxContact" CssClass="validateError"></asp:CustomValidator></p>
    </p>

    <asp:Button ID="BtPostContact" CssClass="commentSubmit" runat="server" Text="Gửi" OnClick="BtPostContact_Click"/>
</div>